<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form"%>

<!doctype html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->

<head>
<jsp:include page="../../views/include/header.jsp" />
<script type="text/javascript">
function resendEmail(regid){
	$('#id').val(regid);
	clicksubmit('_eventId_resendemail');
}
function clicksubmit(inputname){
	$("input[name="+inputname+"]").click();
}
</script>
</head>
<body>
<sf:form method="post" modelAttribute="registerFilter">
	<input type="submit" name="_eventId_excel" value="Save as Excel"/>
	<input type="hidden" name="_flowExecutionKey" value="${flowExecutionKey}" />
	<sf:hidden path="id"/>
	<div style="display: none;">
		<input type="submit" name="_eventId_resendemail" value="Resend Email"/>
	</div>
<h2>Registration Report</h2>
<table border="1"><tbody>
<tr>
	<th>Id</th>
	<th>Register Date</th>
	<th>Updated Date</th>
	<th>Type</th>
	<th>School</th>
	<th>Teacher Name</th>
	<th>Mobile</th>
	<th>Email</th>
	<th>No of Student</th>
	<th>No of Teacher</th>
	<th>Student Name</th>
	<th>Student School</th>
	<th>Student Mobile</th>
	<th>Student Email</th>
	<th></th>
</tr>
<c:forEach items="${registerList}" var="r" varStatus="rStatus">
<tr>
	<td><c:out value="${r.id}"/></td>
	<td><fmt:formatDate value="${r.createdDate}" type="both"/></td>
	<td><fmt:formatDate value="${r.updatedDate}" type="both"/></td>
	<td><c:out value="${r.type eq 1?'Teacher':r.type eq 2?'Student':r.type}"/></td>
	<td><c:out value="${r.school}"/></td>
	<td><c:out value="${r.name}"/></td>
	<td><c:out value="${r.mobile}"/></td>
	<td><c:out value="${r.email}"/></td>
	<td><c:out value="${r.noStudent}"/></td>
	<td><c:out value="${r.noTeacher}"/></td>
	<td><c:out value="${r.stuName}"/></td>
	<td><c:out value="${r.stuSchool}"/></td>
	<td><c:out value="${r.stuMobile}"/></td>
	<td><c:out value="${r.stuEmail}"/></td>
	<td>
		<input type="button" value="Resend Email" onclick="javascript:resendEmail(${r.id});"/>
	</td>
	 
</tr>
</c:forEach>
</tbody></table>
</sf:form>
</body></html>